﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
using FazaDemo.PL.ViewModelEntities;

namespace FazaDemo.PL.Mapping
{
    class TextCharEnumSelectItemsConvertWorker : ICharEnumSelectItemsConvertWorker
    {

        private readonly IList<DropDownCondition> _cDropDowns = new List<DropDownCondition>
        {
            new DropDownCondition{Id = 0, Name = " "}, 
            new DropDownCondition{Id = 1, Name = "Без условий"}, 
            new DropDownCondition{Id = 2, Name = "Пусто"}, 
            new DropDownCondition{Id = 3, Name = "Не пусто"}, 
            new DropDownCondition{Id = 4, Name = "Совпадает с (= текст)"}, 
            new DropDownCondition{Id = 5, Name = "Не совпадает (#текст)"}, 
            new DropDownCondition{Id = 6, Name = "Начинается ( текст...)"}, 
            new DropDownCondition{Id = 7, Name = "Не начинается"}, 
            new DropDownCondition{Id = 8, Name = "Содержит (...текст...)"}, 
            new DropDownCondition{Id = 9, Name = "Не содержит"}, 
            new DropDownCondition{Id = 10, Name = "Оканчивается (... текст)"}, 
            new DropDownCondition{Id = 11, Name = "Не оканчивается"}, 
            new DropDownCondition{Id = 12, Name = "Из перечня (... , ...)"}, 
            new DropDownCondition{Id = 13, Name = "Вне перечня (... , ...)"}, 
            new DropDownCondition{Id = 14, Name = "В диапазоне (от ... до ...)"}, 
            new DropDownCondition{Id = 15, Name = "Вне диапазона"}
        };

        public IEnumerable<SelectListItem> Convert()
        {
            return new SelectList(_cDropDowns, "Id", "Name", 0);
        }
    }
}
